function myfunc(){
   
}
function mh_class(name){
    this.name = name
}
mh_class.prototype ={
    click :function(){
       console.log(this.name);
    }
  };
myfunc.prototype.getClass=function(className){
    var classObjs = new Array()
    var classInt = 0;
    var tags = document.getElementsByTagName('*')
    for(i in tags){
        //如果类型是属性节点返回1
        if(tags[i].nodeType==1){
            if(tags[i].getAttribute('class')==className){
                classObjs[classInt]= new mh_class(tags[i].getAttribute('class'))
                classInt++
            }
        }
    }
    return classObjs
 }     
mh= new myfunc()